<form id="form" action="<?php echo site_url(array('inicio', 'registrar'));?>" method="post">
	<table class="form-table">
		<tr>
			<td><label>Nombre:</label></td>
			<td><input name="nombres" type="text" size="25" maxlength="45" class="validate[required]"/></td>	
		</tr>
		<tr>
			<td><label>Password:</label></td>
			<td><input type="password" maxlength="25" size="25" name="password" class="validate[required,minSize[6]]"/></td>	
		</tr>	
		<tr>
			<td><label>Repita Password:</label></td>
			<td><input type="password" maxlength="25" size="25" name="cpassword" class="validate[required,minSize[6]]"/></td>	
		</tr>
		<tr>
			<td><label>Email:</label></td>
			<td><input maxlength="35" type="text" size="25" name="email" class="validate[required,custom[email]]"/></td>	
		</tr>
		<tr>
			<td><label>Apellido:</label></td>
			<td><input type="text" size="25" maxlength="45" name="apellido" class="validate[required]"/></td>	
		</tr>
		<tr>
			<td><label>Documento:</label></td>
			<td><input id="form" type="number" maxlength="35" size="25" name="documento" class="validate[required, custom[number], minSize[8]]"/></td>	
		</tr>
		<tr>
   			<td><label for="pais_fk">Pais</label></td>
   			<td>
				<select name="pais_fk" style="width: 200px;">
					<option></option>
					<?php foreach ($paises as $pais):?>
					<option <?php echo 'selected="selected"';?> value=<?php echo $pais['id'];?>><?php echo $pais['nombre'];?></option>
					<?php endforeach;?>
				</select>
			</td>			    		
		</tr>
   		<tr>
   			<td><label for="departamento_fk">Departamento</label></td>
   			<td>
				<select name="departamento_fk" style="width: 200px;">
					<option></option>
					<?php foreach ($departamentos as $departamento):?>
					<option <?php echo 'selected="selected"';?> value=<?php echo $departamento['id'];?>><?php echo $departamento['nombre'];?></option>
					<?php  endforeach;?>
				</select>
			</td>		    		
		</tr>
   		<tr>
		<tr>
			<td><label>Barrio:</label></td>
			<td><input maxlength="35" size="25" type="text" name="barrio" /></td>	
		</tr>
		<tr>
			<td><label>Direccion:</label></td>
			<td><input maxlength="35" size="25" type="text" name="direccion" class="validate[required]"/></td>	
		</tr>
		<tr>
			<td><label>Celular:</label></td>
			<td><input maxlength="35" size="25" type="number" name="celular" class="validate[required, custom[phone]]"/></td>	
		</tr>
		<tr>
			<td><label>Coordenadas:</label></td>
			<td><input maxlength="35" size="25" name="coordenadas" /></td>	
		</tr>
		<tr>
			<td><label>Tipo de Registro:</label></td>
			<td>
				<input type="radio" name="tipo" value="CLIENTE" checked="checked" />Usuario
				<input type="radio" name="tipo" value="TECNICO" />Tecnico
			</td>	
		</tr>
	</table>
	<input id="insertar-usr" type="submit" value="Registrar"/>	
</form>

<script type="text/javascript">
	 	//abrir pop-up para edicion de password
		$("#insertar-usr").click(function(){
			 abrirPasswordForm();
		});
</script> 
